package cn.com.cifi.mars.web.action.report;

import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletResponse;

@Api(tags = "报表API")
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/report")
public interface IReturnPlanProgessController {
	
    @ApiOperation(value = "查询回款计划进度表", notes = "查询回款计划进度表")
    @GetMapping(value = "returnPlanProgress")
    R returnPlanProgress(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @ApiParam(value = "指定年月", required = true) @RequestParam(value = "yearMonth",required = true) String yearMonth,
            @ApiParam(value = "模糊搜索字段(区域名称、城市名称、项目名称)", required = false) @RequestParam(value = "name",required = false) String name,
            @ApiParam(value = "版本状态", required = false) @RequestParam(value = "versionStatus",required = false) String versionStatus,
            @ApiParam(value = "起始时间", required = false) @RequestParam(value = "startTime",required = false)String startTime,
            @ApiParam(value = "结束时间", required = false) @RequestParam(value = "endTime",required = false)String endTime);

    @ApiOperation(value = "回款计划进度表导出", notes = "回款计划进度表导出")
    @GetMapping(value = "returnPlanProgressExport")
    void returnPlanProgressExport(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            HttpServletResponse response,
            @ApiParam(value = "指定年月", required = true) @RequestParam String yearMonth);

    @ApiOperation(value = "手动刷新符合条件的回款计划列表")
    @GetMapping(value = "refreshReturnPlanProgressStageIsSale")
    R refreshSignPlanProgress(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion
    );
}
